package com.wangzhixuan.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wangzhixuan.commons.utils.PageInfo;
import com.wangzhixuan.mapper.ActivityMapper;
import com.wangzhixuan.mapper.RoleMapper;
import com.wangzhixuan.model.Activity;
import com.wangzhixuan.model.Role;
import com.wangzhixuan.service.IActivityService;
import com.baomidou.framework.service.impl.SuperServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

/**
 * 
 * Activity 表数据服务层接口实现类
 * 
 */
@Service
public class ActivityServiceImpl extends
		SuperServiceImpl<ActivityMapper, Activity> implements IActivityService {
	@Autowired
	private ActivityMapper activityMapper;

	@Override
	public void selectDataGrid(PageInfo pageInfo) {
		Page<Activity> page = new Page<Activity>(pageInfo.getNowpage(),pageInfo.getSize());
		List<Activity> list = activityMapper.selectActivityList(page, pageInfo.getSort(),pageInfo.getOrder());
		pageInfo.setRows(list);
		pageInfo.setTotal(page.getTotal());
	}

}